package com.weiwei.diancan.http;

import com.weiwei.diancan.bean.ChartBean;
import com.weiwei.diancan.bean.FindOrderBean;
import com.weiwei.diancan.bean.JiluBean;
import com.weiwei.diancan.bean.LoginBean;
import com.weiwei.diancan.bean.WaterInfo;

import java.util.Map;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by BMW on 2016/11/3.
 */
public interface ApiManager {

    @FormUrlEncoded
    @POST("moblie/user/login")
    Observable<LoginBean> login(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/android")
    Observable<ResponseBody> updateVersion(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/waiter_login")
    Observable<WaterInfo> waiter_login(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/get_list_again")
    Observable<LoginBean> refreshData(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/delete_order_log")
    Observable<LoginBean> deleteOrder(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/add_order")
    Observable<LoginBean> addOrder(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/add_order_go")
    Observable<LoginBean> addOrderGo(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/upd_table")
    Observable<LoginBean> upd_table(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/person_upd")
    Observable<LoginBean> person_upd(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/add_order_log")
    Observable<LoginBean> add_order_log(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/look_log")
    Observable<JiluBean> look_log(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/checkout_order_all")
    Observable<LoginBean> checkout_order_all(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/checkout_order_one")
    Observable<LoginBean> checkout_order_one(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/clean_table")
    Observable<LoginBean> clean_table(@FieldMap Map<String,String> map);

    @GET("validateAndCacheCardInfo.json")
    Observable<ResponseBody> getCard(@Query("input_charset") String utf,
                                     @Query("cardNo") String cardNo,
                                     @Query("cardBinCheck") boolean isCheck);

    @FormUrlEncoded
    @POST("moblie/user/find_order")
    Observable<FindOrderBean> find_order(@FieldMap Map<String,String> map);

    @FormUrlEncoded
    @POST("moblie/user/find_chart")
    Observable<ChartBean> find_chart(@FieldMap Map<String,String> map);

}
